<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="__STATIC__/plugins/layui/css/layui.css" media="all" />
		<link rel="stylesheet" href="__CSS__/global.css" media="all">
		<link rel="stylesheet" href="__STATIC__/plugins/font-awesome/css/font-awesome.min.css">
		<link rel="stylesheet" href="__CSS__/table.css" />
	</head>

	<body>


		<div style="border-style: solid; border-width: 1px;border-color: #CCC">

			<blockquote class="layui-elem-quote">
				<a href="__ADMIN__/team/adduser" class="layui-btn layui-btn-small">
					<i class="layui-icon">&#xe608;</i> 添加团队
				</a>
					
				<a href="__ADMIN__/commodel/index" class="layui-btn layui-btn-small">
					<i class="layui-icon">&#xe608;</i> 设置默认金额
				</a>
				
			</blockquote>
			<h3 style="background-color: #f0ffff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;筛选</h3>
			<br>
			<form action="__ADMIN__/team/index" method="post">
				<div class="layui-form-item">
					<label class="layui-form-label">工号:</label>
					<div class="layui-input-block">
						<input name="uid" lay-verify="title" id='uid' autocomplete="off" placeholder="" value="{$uid}" class="layui-input" type="text">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">昵称 :</label>
					<div class="layui-input-block">
						<input name="nickname" lay-verify="title" id='nickname' autocomplete="off" placeholder="" value="{$nickname}" class="layui-input" type="text">
					</div>
				</div>
				  <div class="layui-input-block">
					<input type="submit" class="layui-btn" value="提交">
				</div>
			</form>
		</div>
		<br>
			<fieldset class="layui-elem-field">
				<legend>数据列表</legend>
				<div class="layui-field-box">
					<table class="site-table table-hover">
						<thead>
							<tr>     
								<th>ID</th>
								<th>昵称</th>
								<th>头像</th>
								<th>团队人数</th>
								<th>上级团队</th>
								<th>上级股东</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody id ="tbody">			
					   {volist name="list" id="vo"}
		
					  		<tr>
								<td>{$vo.uid}</td>
								<td>{$vo.nickname}</td>
								<td><img src="{$vo.avatar}"  width="80px"></td>
								<td>{$vo.mem_count}</td>
								<td>{$vo.team_name}</td>
								<td>{$vo.partner_name}</td>
								<td><a href="__ADMIN__/team/add?id='+res[a].uid+'" class="layui-btn layui-btn-mini">编辑</a>
								<a href="__ADMIN__/commodel/bank?id={$vo.uid}" class="layui-btn layui-btn-mini">分配模板</a></td>

					     	</tr>
							{/volist}
						</tbody>
					</table>
							<div id="page"></div>
	
				</div>
			</fieldset>
	</body>

			<script type="text/javascript" src="__STATIC__/plugins/layui/layui.js"></script>
			<script type="text/javascript" src="__STATIC__/datas/nav.js"></script>	
			<script src="__JS__/index.js"></script>
		    <script src="__JS__/jquery.js"></script>

	</html>
		<script>
			layui.config({
				base: '__STATIC__/plugins/layui/modules/'
			});
			layui.use(['laypage', 'layer'], function(){
				  var laypage = layui.laypage;
				  var uid = $("#uid").val();
				  var nickname = $("#nickname").val();
				    laypage.render({
					    elem: 'page'
					    ,count: {$count} //数据总数
					    ,limit:20
					    ,jump: function(obj){
					     	$.ajax({
					     		type:"post",
					     		url:"__ADMIN__/team/index",
					     		data:{
					     			page:obj.curr,
					     			uid:uid,
					     			nickname:nickname
					     		},
					     		dataType:"json",
					     		success:function(res){
					     			var table =  "";
					     			
					     			for(var a = 0 ;a<res.length;a++){
					     				// alert(res.length);
					     				 table+= '<tr>';
					     				 table+= '<td>'+res[a].uid+'</td>';
					     				 table+= '<td>'+res[a].nickname+'</td>';
					     				 table+= '<td><img src="'+res[a].avatar+'"  width="80px"></td>';
					     				 table+= '<td>'+res[a].mem_count+'</td>';
					     				 table+= '<td>'+res[a].team_name+'</td>';
					     				 table+= '<td>'+res[a].partner_name+'</td>';
					     				 table+= '<td><a href="__ADMIN__/team/add?id='+res[a].uid+'" class="layui-btn layui-btn-mini">编辑</a>  <a href="__ADMIN__/commodel/bank?id='+res[a].uid+'" class="layui-btn layui-btn-mini">分配模板</a></td>';
					     				 table+= '</tr>';

			
					     			}
					     			 $("#tbody").html(table);

					     		}
					     	})
					    }
					  });




			})
		</script>
		<script type="text/javascript">
			$(".status").click(function(){
				var status = $(this).attr("src");
				$.ajax({
					url:"__ADMIN__/dksq/index",
					type:"post",
					data:{
						status:status
					},
					dataType:"json",
					success:function(res){
						var table =  "";
					     			for(var a = 0 ;a<res.length;a++){
					     				// alert(res.length);
					     				 table+= '<tr>';
					     				 table+= '<td>'+res[a].id+'</td>';
					     				 table+= '<td>'+res[a].bank_name+'</td>';
					     				 table+= '<td>'+res[a].money+'</td>';
					     				 table+= '<td>'+res[a].user_id+'</td>';
					     				 table+= '<td>'+res[a].hide_name+'</td>';
					     				 table+= '<td>'+res[a].mobile+'</td>';
					     				 table+= '<td>'+res[a].idcard+'</td>';
					     				 table+= '<td>'+res[a].status+'</td>';
					     				 table+= '<td>'+res[a].create_time+'</td>';
					     				 table+= '<td>'+res[a].update_time+'</td>';
					     				 table+= '<td><a href="__ADMIN__/dksq/add?id='+res[a].id+'" class="layui-btn layui-btn-mini">编辑</a></td>';
					     				 table+= '</tr>';

			
					     			}
					     			 $("#tbody").html(table);


					}
				})
			})

		</script>